﻿using System.Web.Mvc;

namespace WebPlatform.Areas.CPP
{
    public class CPPAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "CPP";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
              "CPP_product",
              "CPP/{controller}/{action}/{pid}",
              new { action = "Index", pid = UrlParameter.Optional },
               new string[] { "WebPlatform.Areas.CPP.Controllers" }
          );

            context.MapRoute(
               "CPP_company",
               "CPP/{controller}/{action}/{cid}",
               new { action = "Index", cid = "cid" },
                new string[] { "WebPlatform.Areas.CPP.Controllers" }
           );



            context.MapRoute(
                "CPP_default",
                "CPP/{controller}/{action}/{id}",
                new { area = "CPP", controller = "Default", action = "Index", id = UrlParameter.Optional },
                new { area = "CPP" },
                 new string[] { "WebPlatform.Areas.CPP.Controllers" }
            );
        }
    }
}
